//
//  CommonModels.swift
//  LeGou
//
//  Created by lxm on 2022/7/23.
//

import Foundation
import HandyJSON
import KakaJSON
struct CommonModels {
    struct UserInfo : HandyJSON {
        var account = ""
        var addIp = ""
        var addres = ""
        var adminid: Int = 0
        var avatar = ""
        var birthday = ""
        var cityId: Int = 0
        var cleanTime = ""
        var country = ""
        var createTime = ""
        var groupId = ""
        var isPromoter: Int = 0
        var lastIp = ""
        var lastLoginTime = ""
        var loginType = ""
        var mark = ""
        var nickname = ""
        var partnerId: Int = 0
        var payCount: Int = 0
        var phone = ""
        var promoterTime = ""
        var realName = ""
        var sex: Bool = false
        var showId = ""
        var spreadCount: Int = 0
        var spreadTime = ""
        var spreadUid: Int = 0
        var status: Bool = false
        var tagId = ""
        var treeId: Int = 0
        var treeMax: Int = 0
        var uid: Int = 0
        var updateTime = ""
        var wxNo = ""
        var wechatNo = ""
        var wechatCode = ""
        var area = ""
        var spreadName = ""
        var totalActivity = 0.0
        // 是否是合伙人
        var partnerState = false
        
        var serviceProviderLevel = 0
        
        var cardId = ""
        // 淘宝授权
        var relationId = ""
        
        var hasTradePwd = false
        // 是否设置交易密码
        var isTradeOk : Bool {
            return hasTradePwd
        }
        
        // 是否在小黑屋中0否1是
        var darkRoom = 0
        
        // 铁军状态
        var ironArmy = false
        // 
        var teamLevel = 0
    }
    
    struct CityModel : HandyJSON {
        var id = 0
        var cityId = 0
        var parentId = 0
        var areaCode = 0
        var name = ""
        var mergerName = ""
        var lat = 0.0
        var lng = 0.0
        var child : [CityModel]?
    }
    
    struct PaySetting : HandyJSON {
        var payWeixinOpen = 0
        var aliPayStatus = 0
        var ckOpenStatus = 0
        var balanceOpenStatus = 0
    }
}

